package com.view
{
	import flash.display.Graphics;
	import flash.display.Shape;
	import flash.display.BlendMode;
	
	import sekati.display.Canvas;
	import sekati.display.CoreSprite;
	import flash.events.MouseEvent;
	import caurina.transitions.Tweener;
	
	
	public class awardItem extends CoreSprite
	{
		protected var fadeSpeed : Number = .25;
		protected var tweenType : String = "easeOutQuint";
		
		/** this clash is define the award box in first stage*/
		public function awardItem() 
		{
			super();
			drawBg();
			alpha=0.3;
			addEventListener(MouseEvent.MOUSE_OVER, _onOver);
			addEventListener(MouseEvent.MOUSE_OUT, _onOut);
		}
		private function drawBg():void{
			var bggrey:Shape = new Shape();
			bggrey.graphics.beginFill(0x101010,1);			
			bggrey.graphics.drawRect(0,0,320,250);
			bggrey.graphics.endFill();
			bggrey.blendMode=BlendMode.MULTIPLY;
			addChild(bggrey);
			
			var bggreylay:Shape = new Shape();
			bggreylay.graphics.beginFill(0x000000,1);			
			bggreylay.graphics.drawRect(10,10,300,230);
			bggreylay.graphics.endFill();
			addChild(bggreylay);
		}
		
		protected function _onOver(e : MouseEvent = null) : void {
			Tweener.addTween(this,{alpha: 0.8, time: fadeSpeed, transition: tweenType} );			
		} 
		protected function _onOut(e : MouseEvent = null) : void {
			Tweener.addTween(this,{alpha: 0.3, time: fadeSpeed, transition: tweenType} );		
		}
		
	}
}